//
//  TradingRecordCell.swift
//  RPay
//
//  Created by CharlieLiao on 2017/7/8.
//  Copyright © 2017年 Charlie. All rights reserved.
//

import UIKit

class TradingRecordCell: UITableViewCell {
    
    // MARK: - Get
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var timeLabel: UILabel!
    @IBOutlet weak var amountLabel: UILabel!
    
    var amount: Float = 0.0 {
        didSet {
            if amount >= 0 {
                amountLabel.text = String(format: "+%.2f", amount)
                amountLabel.textColor = UIColor.appOrange
            } else {
                amountLabel.text = String(format: "-%.2f", amount)
                amountLabel.textColor = UIColor.appText
            }
        }
    }
}
